package com.jh.user.service;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

import static org.springframework.web.bind.annotation.RequestMethod.GET;


/**
 * @author Fuchun
 * @since 1.0
 */
@Component("riskClient")
@FeignClient(name = "http://risk", fallback = RiskClientFallback.class)
public interface RiskClient {

    @RequestMapping(value = "/v1.0/risk/blackwhite/query/phone", method = GET)
    Map<String, Object> getWhitelist(
            @RequestParam("phone") String phone, @RequestParam("operation_type") String type);
}
